<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script> 
    //菜鸟教程 
    //$when函数提供一种方法     执行一个或多个对象的回调函数     
    
    /*
    export default function loadNav(callback,defaultIndex) {
    localStorage.clear()
    let navListData;
    $.when(
        $.ajax({
            // url: './controller/queryVodInterface.php',
            url: './uios_cntv3.0/controller/queryVodInterface.php',
            data: {
                type: "categoryInfo",
                cateID: 2904,
            },
            dataType: "json"
        }),
        $.ajax({
            // url: './controller/queryVodInterface.php',
            url: './uios_cntv3.0/controller/queryVodInterface.php',
            data: {
                type: "categoryList",
                cateID: 2904,
            },
            dataType: "json"
        })).done(function (data1, data2) {                                 //<-------------回调在这儿  
            // console.log('data1', data1)
            // console.log('data2', data2)
            let tmp=[]
            navListData = data2[0].categoryList
            for(let i=0;i<navListData.length;i++){
                if(navListData[i]['description'].slice(0,1)=='1'){
                    tmp.push(navListData[i])
                }
            }
            // console.log(tmp) //过滤后数据 
            localStorage.setItem('navCatData',JSON.stringify(tmp)) 
            let str = '';
            tmp.forEach((item, index) => {
                const val = item.pictures.Thumbnail,
                      key = index;
                str += `<li class="view__container focusLiDom-${index} unfocused" data-nth="${index}" style="width:171px;height:63px;background:none;">
                            <img class="show" src="${item.pictures.Poster}" style="position: absolute;width:171px;height:63px;">
                            <img class="hide" src="${item.pictures.Still}" style="position: absolute;width:171px;height:63px;">
                            <img id="group0_${index}" src="${data1[0].pictures.Poster}" style="position: absolute;width:171px;height:63px;visibility: hidden;">
                        </li>
                            `;
            });
            callback(str);
            $("#group0_"+defaultIndex).css('visibility','visible')

            // console.log(defaultIndex)
            //移动逻辑 
            let groupLeft='0px';
            const $navList = $('#navList');  
            if (defaultIndex >= 2 && defaultIndex<tmp.length-2) {
                groupLeft = -(defaultIndex - 2) * 203 + 'px';
                $navList.css('left', groupLeft);
            } else if (defaultIndex>=tmp.length-2) { 
                groupLeft = -(tmp.length-5) * 203 + 'px';
                $navList.css('left', groupLeft);  
            }


    });
    
}

    
    
    
    
    
    */    


</script>